using System;
using System.Collections.Generic;
using System.Text;
using Barrage.GUI;
using Barrage.GUI.Elements;
using Spacedash.Logic;

namespace Spacedash.Game.Subgames
{
    static class ProfilesElements
    {
        public const string ExitButton = "EXIT_BUTTON";
        public const string NewButton = "NEW_BUTTON";
        public const string ModifyButton = "MODIFY_BUTTON";        
    }
    class ProfilesSection:GUISection
    {
        public override int Id
        {
            get { return (int)GameState.Profiles; }
        }
        
        public ProfilesSection(SpacedashGame parent)
            : base("Profiles", parent)
        {
            RegisterButtonEvent(ProfilesElements.NewButton,new GUIButtonHandler(NewButtonClick));
            RegisterButtonEvent(ProfilesElements.ModifyButton, new GUIButtonHandler(ModifyButtonClick));
            RegisterButtonEvent(ProfilesElements.ExitButton, new GUIButtonHandler(ExitButtonClick));
        }

        public void NewButtonClick(string buttonId)
        {
            parent.NextGameSection = new EditProfileSection(new Profile(""), (SpacedashGame)parent);             
        }

        public void ModifyButtonClick(string buttonId)
        {
            Parent.NextGameSectionId = (int)GameState.ModifyProfile;
        }
        public void ExitButtonClick(string buttonId)
        {
            Parent.NextGameSectionId = (int)GameState.MainMenu;
        }



    }
}
